

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.io.Serializable;

public class TextObject extends ShapeObject implements Serializable{

	protected StringBuffer text;
	
	public TextObject(Point startingMousePosition,Point endingMousePosition, Color color, StringBuffer text) {
		super(startingMousePosition, endingMousePosition, color);
		this.text = text;
	}

	protected DrawingCanvas canvas;

	
	public void drawShape(DrawingCanvas canvas){

	    Graphics iBGraphics = canvas.getImageBufferGraphics();
	    iBGraphics.setColor(this.color);
	    iBGraphics.drawString(text.toString(), startingMousePosition.x,endingMousePosition.y); 
	    canvas.repaint();
	}

	public boolean isResizeable() {
		return false;
	}
}
